import cv2
import numpy as np
import sys

def mix_picture(RGB: list, img, mask):
    # 按照前景尺寸来改变背景的尺寸
    mk = np.stack((mask['data'], ) * 3, axis=-1)
    for h in range(img.shape[0]):
        for w in range(img.shape[1]):
            if mask['data'][h][w] < 190:
                img[h][w] = RGB
    # cv2.imwrite('1.jpg', img)